import common from '../vendor/common'
import '../scss/serve_detail.scss'
import { getIndexServerShow, auditToServer } from '../vendor/api' // 请求的接口数据
const Vue = common.Vue
const mui = common.mui
let serveDetailVue = {}
try {
  mui.plusReady(function () {
    serveDetailVue = new Vue({ // 精品推荐列表vue实例
      el: '#serveDetailVue',
      data: {
        id: '',
        images: [],
        title: '',
        name: ''
      },
      methods: {
        toBuidingDetail: function(id) {
          skipBuildingShow(id)
        },
        callServer: function() {
          auditToServer('APP端'+serveDetailVue.name).then(res => {
            console.log('记录成功')
          })
        }
      }
    })
    window.addEventListener('upData', function(event){
      mui.scrollTo(0,1);
      serveDetailVue.images = []
      serveDetailVue.id = event.detail.id
      serveDetailVue.title = event.detail.title
      serveDetailVue.images = event.detail.detail_url
      serveDetailVue.name = event.detail.name
    })
     // 电话咨询
  })
}catch(e) {
  console.log('首页出错啦')
}